// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 添加评论 POST /api/comment/add */
export async function addCommentUsingPost(
  body: API.CommentAddDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/comment/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 删除评论 POST /api/comment/delete */
export async function deleteCommentUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/comment/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 管理员获取单条评论 POST /api/comment/get */
export async function getCommentByIdUsingPost(
  body: API.CommentQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseComment_>('/api/comment/get', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 获取脱敏后的单条评论 GET /api/comment/get/vo */
export async function getCommentVoByIdUsingGet(
  body: API.CommentQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseCommentVO_>('/api/comment/get/vo', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 管理员分页获取评论列表 POST /api/comment/list */
export async function listCommentByPageUsingPost(
  body: API.CommentQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageComment_>('/api/comment/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 分页获取脱敏后的评论列表 POST /api/comment/list/vo */
export async function listCommentVoByPageUsingPost(
  body: API.CommentQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageCommentVO_>('/api/comment/list/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
